{include file=member.header.html}
<script type="text/javascript">
var _orig_goods_amount = {$order.goods_amount},
    _orig_shipping_fee = {$shipping.shipping_fee},
    _orig_order_amount = {$order.order_amount};
$(function(){
    $('#goods_amount_input').keyup(function(){
        recount_order_amount();
    });
    $('#shipping_fee_input').keyup(function(){
        recount_order_amount();
    });
});
function recount_order_amount(){
    var order_amount = 0;
    order_amount = Number($('#goods_amount_input').val()) + Number($('#shipping_fee_input').val());
    $('#order_amount').html(price_format(order_amount));
}
function submitDdata()
{
	var goods_amount = $('#goods_amount_input').val();
	var shipping_fee = $('#shipping_fee_input').val();
	var url = REAL_SITE_URL+"/index.php?app=seller_order&act=adjust_fee&order_id={$order.order_id}";
	$.post(url,{goods_amount:goods_amount,shipping_fee:shipping_fee},function(data){
		if(data == true){
			msg("{$lang.handle_ok}");
			setTimeout(function(){
				window.location.href=REAL_SITE_URL+"/index.php?app=seller_order";
			},1500);
		}  
	},"json");

}
</script>
<div id="page-seller-order">
	<div class="adjust-fee-body padding10">
        	<p>{$lang.buyer_name}{$lang.colon}{$order.buyer_name|escape}</p>
            <p class="mt10">{$lang.order_sn}:{$order.order_sn}</p>
            <ul class="foll_in mt10">
                <li>
                    <p>{$lang.goods_amount}{$lang.colon}<strong class="color8">{$order.goods_amount|price}</strong></p>
                    <p><input type="text" id="goods_amount_input" class="text" name="goods_amount" value="{$order.goods_amount}"/></p>
                </li>
                <li>
                    <p>{$lang.shipping_fee}{$lang.colon}<strong class="color8">{$shipping.shipping_fee|price}</strong></p>
                    <p><input type="text" id="shipping_fee_input" class="text" name="shipping_fee" value="{$shipping.shipping_fee}" /></p>
                </li>
                <li>{$lang.adjust_fee_notice}</li>
                <li class="mt10">{$lang.order_amount}{$lang.colon}<strong id="order_amount">{$order.order_amount|price}</strong></li>
            </ul>
            <div class="btn-box">
            	<input  type="button" onclick="submitDdata()" id="confirm_button" class="btn1 mt20" value="{$lang.confirm}" />
            </div>
    </div>
</div>